<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>
<script>
	addTo=function()
	{
		$('#all').val($('#all').val()+$('#search').val()+';');
		$('#search').val('');
	}
</script>

<div class="container" style="width:650px;height:400px;padding-top:50px">
    <div class="jumbotron">
		<form action="<?php echo Yii::app()->request->baseUrl; ?>/notification/multisend" method="post" accept-charset="utf-8" role="form">
			<h2>多人通知发送</h2>
			<table class="table"> 
				<tr>
					<td>
						<div class="input-group">
							<span class="input-group-addon">@</span>
							<input type="text" id="all" name="all" class="form-control" placeholder="收件人" required readonly/>
						</div>
					</td>
				</tr>	
				<tr>
					<td>
						<div class="input-group">
						  <?php     
							$this->widget('zii.widgets.jui.CJuiAutoComplete', array(     
								'name'=>'search',
								'id'=>'search',		
								'source'=>$data,     
								// additional javascript options for the autocomplete plugin     
								'options'=>array(     
											'minLength'=>'1',     
											),
										'htmlOptions'=>array(
											'class'=>"form-control",
											'placeholder'=>"查找",
											),     
										));
							?>
						  <span class="input-group-btn">
							<button class="btn btn-default" type="button" onclick="addTo()">添加</button>
						  </span>
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<div class="input-group">
							<input type="text" name="title" class="form-control" placeholder="标题" required />
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<div class="input-group">
							<textarea name="content" style="width:400px" placeholder="通知内容" required></textarea>
						</div>
					</td>
				</tr>
				
				<tr>
					<td><input class="btn btn-success" type="submit" role="button" value="发送"/></td>
					<td><a class="btn btn-success" href="<?php echo Yii::app()->request->baseUrl; ?>/notification/index" role="button">返回</a></td> 
				</tr>  
			</table>  
		</form>
	</div>
</div>

